import { Code, RequestHeader } from '~/components/text/code'
import Caption from '~/components/text/caption'
import Note from '~/components/text/note'
import Link from '~/components/text/link'

export const meta = {
  editUrl: 'pages/docs/api/v2/api-docs-mdx/api-basics/rate-limits.mdx',
  lastEdited: '2019-10-17T14:44:04.000Z'
}

## Rate Limits

We limit the number of calls you can make over a certain period of time.
Rate limits vary and are specified by the following header in all responses:

| Header                                                   | Description                                                                  |
| -------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **<RequestHeader>X-RateLimit-Limit</RequestHeader>**     | The maximum number of requests that the consumer is permitted to make.       |
| **<RequestHeader>X-RateLimit-Remaining</RequestHeader>** | The number of requests remaining in the current rate limit window.           |
| **<RequestHeader>X-RateLimit-Reset</RequestHeader>**     | The time at which the current rate limit window resets in UTC epoch seconds. |

When the rate limit is **exceeded**, an error is returned with the
status "**429 Too Many Requests**":

<Code lang="json">{`{
  "error": {
    "code": "too_many_requests",
    "message": "Rate limit exceeded",
  }
}`}</Code>
<Caption>An example of a rate limit exceeded error.</Caption>

<Note>
  You can find the complete list of rate limits in the{' '}
  <Link href="/docs/v2/platform/limits/">limits documentation</Link>.
</Note>
